package com.ilancuo.thinkinjava.chapter_06;

class Sundae {
    private Sundae() {

    }

    static Sundae makeASundae() {
        return new Sundae();
    }
}

//由于构造方法是私有方法，因此，此类不能被继承
//class Test extends Sundae {
//}

public class IceCream {
    public static void main(String[] args) {
//        Sundae x = new Sundae();
        Sundae x = Sundae.makeASundae();
    }
}